
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

class QLabel;
class QLineEdit;
class QToolButton;
class QListWidget;
class QListWidgetItem;
class DictEngine;
class MeaningDialog;
class LEdit;

class MainWindow: public QMainWindow
{
    Q_OBJECT

public:
	explicit MainWindow(QWidget *parent = 0);
	virtual ~MainWindow();
//	void setOrientation(ScreenOrientation orientation);
	void showExpanded();

private:
	QLabel *databaseNameLabel;
    QLabel *label2;
	LEdit *lineEdit1;
	QToolButton *swapButton;
	QListWidget *listWidget;
	MeaningDialog *meaningDialog;

	DictEngine *dictEngine;
	QStringList databaseNames;
	QString databasePath;
	int minQueryLength;

	void createMenus();
	void readSettings();
	void saveSettings() const;
	void loadDatabaseNames();
	void switchDatabase(QString datName);
//	void closeEvent(QCloseEvent *event);

private slots:
	void hints(QString query);
	void showAboutProgram();
	void updateSettings();
	void showMeaning();
	void showFirstMeaning();
	void switchDatabase();
	void swapLanguage();
};

/*
TBD:
pou�it n�zov z 00-database-short

*/

#endif // MAINWINDOW_H
